package net.apps123.view;

public class SplDataBean {
    private String ipStr;
    private short[] data;

    public SplDataBean(String ipStr, short[] data){
        this.ipStr = ipStr;
        this.data = data;
    }

    public String getIpStr() {
        return ipStr;
    }

    public void setIpStr(String ipStr) {
        this.ipStr = ipStr;
    }

    public short[] getData() {
        return data;
    }

    public void setData(short[] data) {
        this.data = data;
    }


    public double getPointAvg(){
        int noSpectralLines3 = 30;
        //平均值
        double total = 0.0, avg = 0.0;
        for (int i = 0; i < noSpectralLines3; i++){
            total += Math.pow(10, data[i] / 1000.0);
        }
        avg = total / noSpectralLines3;
        return avg;
    }

}
